<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<div >	
			<ul>
				用户:<input type="text" name="username" /><br />
				密码:<input type="password" name="pwd"  /><br />
				性别:男<input type="radio" name="sex" />女<input type="radio" name="sex" /><br />
				学院:<select name="college">
					<option value="软件工程学院">软件工程学院</option>
					<option value="文旅创意学院">文旅创意学院</option>
					<option value="医学护理学院">医学护理学院</option>
					<option value="信息技术学院">信息技术学院</option>
				</select><br />
				爱好:唱<input type="checkbox" name="hobby"/>跳<input type="checkbox" name="hobby"/>rap<input type="checkbox" name="hobby"/><br />
				自我介绍:<br /><textarea rows="5" cols="25" name="text"></textarea><br />
				<button type="button">提交</button>
				<button type="button" onclick="submit()">用name查找</button>
				<button type="button" onclick="regist()">用标签查找</button>
			</ul>
		</div>
	</body>
	<script type="text/javascript">
		function submit(){
			   var a1 = document.getElementsByName('username');
			   console.log(a1);
			   var a2 = document.getElementsByName('pwd');
			   console.log(a2);
			   var a3 = document.getElementsByName('sex');
			   console.log(a3);
			   var a4 = document.getElementsByName('college');
			   console.log(a4);
			   var a5 = document.getElementsByName('checkbox');
			   console.log(a5);
			   var a6 = document.getElementsByName('text');
			   console.log(a6);
		}
		function regist(){
			   var a7 = document.getElementsByTagName('input');
			   console.log(a7);
			   var a8 = document.getElementsByTagName('option');
			   console.log(a8);
			   var a9 = document.getElementsByTagName('textarea');
			   console.log(a9);
		}
	</script>
</html>
